#ifndef _MEUN_H_
#define _MEUN_H_

#include <stdint.h>
#include <stdbool.h>

#define KEY_UP_M      1    // 上键
#define KEY_DOWN_M    2    // 下键
#define KEY_ENTER_M   3    // 确认键
#define KEY_BACK_M    4    // 返回键
#define KEY_LEFT_M    5    // 左键
#define KEY_RIGHT_M   6    // 右键
#define KEY_DelayTime 85

#define  ADC_REG_PATH "/sys/bus/iio/devices/iio:device0/in_voltage7_raw"
#define  ADC_SCALE_PATH "/sys/bus/iio/devices/iio:device0/in_voltage_scale"

// 全局变量声明
extern uint8_t pagee, menu_y1, menu_x1;

extern uint16_t adc_reg;
extern float adc_scale;
extern uint battery_vol;

extern uint16_t fy_wan;
extern uint16_t fy_zhi;
extern uint8_t fy_flag;

void run_loop();
void my_menu_init();
void my_menucmd(char key_num);
uint8_t detect_key();
void show_ip_on_display(const char *interface, int x, int y);

#endif // _MEUN_H_